import fetch from '@/utils/fetch'



export function getSport(id,offset,keyword) {
  return fetch({
    url: '/get/sport',
    method: 'get',
     params: {
     id,
     offset,
     keyword
    }
  })
}


export function deleteSport(id) {
  return fetch({
    url: '/delete/sport',
    method: 'get',
     params: {
     id
    }
  })
}




export function getSportById(id) {

  return fetch({
    url: '/get/sport/by',
    method: 'get',
     params: {
     id
    }
  })
}

export function addSportTag(sport_id,tag) {

  return fetch({
    url: '/add/sport/tag',
    method: 'get',
     params: {
     sport_id,
     tag
    }
  })
}


export function delSportTag(id) {

  return fetch({
    url: '/delete/sport/tag',
    method: 'get',
     params: {
     id
    }
  })
}

export function addSport(content,addressInfo) {

  return fetch({
    url: '/add/sport',
    method: 'post',
     data: {
    content,
    addressInfo
    }
  })
}


export function getSportJoiner(id) {

  return fetch({
    url: '/get/sport/joiner',
    method: 'get',
     params: {
     id
    }
  })
}





   
